package com.samphanie.auiu.http.api

import com.samphanie.auiu.model.TokenInfo
import com.samphanie.auiu.library.restful.AuiuCall
import com.samphanie.auiu.library.restful.annotation.Filed
import com.samphanie.auiu.library.restful.annotation.Get
import com.samphanie.auiu.library.restful.annotation.Post
import com.samphanie.auiu.model.RegisterUser
import com.samphanie.auiu.model.UserProfile

/**
 * @author Dries
 **/
interface AccountApi {

    @Post("/auiu-app/v1/authorize/user/login")
    fun login(
        @Filed("clientId") clientId: String,
        @Filed("clientSecret") clientSecret: String,
        @Filed("username") username: String,
        @Filed("password") password: String,
    ): AuiuCall<TokenInfo>

    @Post("/auiu-app/v1/authorize/user/register")
    fun register(
        @Filed("username") username: String,
        @Filed("password") password: String,
    ): AuiuCall<RegisterUser>

    @Get("/auiu-app/v1/user/info")
    fun profile(): AuiuCall<UserProfile>

}